package com.wjx.demo.enumeration

enum class Color(value: Int) {
    GREEN(1),
    RED(2),
    WRITE(3)
}

fun main(args: Array<String>) {
    var green = Color.GREEN;
    println(green.name)
    println(green.ordinal)
    val red = Color.valueOf("RED")
    println(red.name)
}